﻿using BCCommon.FMISEnums;
using BCCommon.OAEnums.Workflow;

namespace BCEntity.OA.TeamWorks.TaskRecord
{
    /// <summary>
    /// 财务系统任务记录
    /// </summary>
    public class FMISTaskRecordEntity : TaskRecordEntity
    {
        /// <summary>
        /// 任务记录Id
        /// </summary>
        public long TaskRecordId { get; set; }
       
        /// <summary>
        /// 业务类型名称
        /// </summary>
        public new string BusinessTypeName { get; set; }

        /// <summary>
        /// 任务类型
        /// </summary>
        public FMISTaskType TaskType { get; set; }
       
        /// <summary>
        /// 任务类型名称
        /// </summary>
        public string TaskTypeName { get; set; }
       
        /// <summary>
        /// 应收款金额
        /// </summary>
        public decimal? ReceivableAmount { get; set; }
       
        /// <summary>
        /// 应付款金额
        /// </summary>
        public decimal? PayableAmount { get; set; }
       
        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal? ActualReceiptAmount { get; set; }
      
        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal? ActualPaidAmount { get; set; }
      
        /// <summary>
        /// 任务异常
        /// </summary>
        public bool IsException { get; set; }
       
        /// <summary>
        /// 异常描述
        /// </summary>
        public string ExceptionDescription { get; set; }
       
        /// <summary>
        /// 处理备注
        /// </summary>
        public string HandledRemark { get; set; }
      
        /// <summary>
        /// 步骤类型
        /// </summary>
        public WorkflowStepType StepType { get; set; }
      
        /// <summary>
        /// 销售合同编号
        /// </summary>
        public string SaleContractNo { get; set; }
      
        /// <summary>
        /// 销售车辆唯一码
        /// </summary>
        public string SaleUniqueCode { get; set; }
        
        /// <summary>
        /// 采购合同编号
        /// </summary>
        public string PurchaseContractNo { get; set; }

        /// <summary>
        /// 车辆采购唯一码
        /// </summary>
        public string PurchaseUniqueCode { get; set; }
       
        /// <summary>
        /// 资金提现编号 (由于 Dto 上占用到了 ReferenceNo 字段，推动修改困难)。
        /// </summary>
        public long? CapitalPoolWithdrawId { get; set; }

        /// <summary>
        /// 资金池抵扣金额
        /// </summary>
        public decimal? CapitalDeductionAmount { get; set; }
        /// <summary>
        /// 购买方姓名
        /// </summary>
        public string BuyerName { get; set; }
        /// <summary>
        /// 保证金抵扣金额
        /// </summary>
        public decimal? DepositDeductionAmount { get; set; }

        /// <summary>
        /// 返利资金池抵扣金额
        /// </summary>
        public decimal? RebateDeductionAmount { get; set; }

        /// <summary>
        /// 是否全部抵扣
        /// </summary>
        public bool IsAllDeducted { get; set; } = false;
    }
}
